package com.film.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.film.domain.Performer;

public class PerformerRowMapper implements RowMapper<Performer> {

	@Override
	public Performer mapRow(ResultSet res, int arg1) throws SQLException {
		Performer per = new Performer();
		per.setPerId(res.getInt("per_id"));
		per.setPerName(res.getString("per_name"));
		per.setPerNickName(res.getString("per_nickname"));
		per.setPerTypr(res.getString("per_foreignName"));//per_foreignName
		per.setPerBirth(res.getString("per_birth"));
		per.setPerHeight(res.getString("per_height"));
		per.setPerSex(res.getString("per_sex"));
		per.setPerNationnality(res.getString("per_nationality"));//per_nationality
		per.setPerBirthPlace(res.getString("per_birthPlace"));
		per.setPerStar(res.getString("per_star"));
		per.setPerIntroduce(res.getString("per_introduce"));
		per.setPerImg(res.getString("per_img"));
		return per;
	}

}
